import express, { Express } from "express";
import router from './router'
import bodyParser from 'body-parser';
import cors from 'cors';
const app: Express = express()
const post = 3333

app.use(bodyParser.json());  //配置解析，用于解析json和urlencoded格式的数据
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cors())
app.use(router)
app.use(express.static('public'))



app.listen(post, () => {
    console.log(`success server${'http://localhost:3333'}`)
})